/*
Copyright 2008, 2009 Joonas Lehtolahti

This file is part of Shared Datatypes and Utilities.

Shared Datatypes and Utilities is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Shared Datatypes and Utilities is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Shared Datatypes and Utilities.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _NON0STRING_H_
#define _NON0STRING_H_

#include "shared_def.h"

typedef struct _non0string
{
  unsigned char* s;
  unsigned int l;
}non0string;

/* non0string allocation function */
DLLEXPORT(non0string*) n0salloc(size_t);

/* non0string freeing function */
DLLEXPORT(void) n0sfree(non0string*);

/* Other non0string functions */
DLLEXPORT(unsigned char*) n0strstr(non0string*, const unsigned char*);
DLLEXPORT(int) n0strcmp(non0string*, non0string*);
DLLEXPORT(non0string*) n0scopy(non0string*);
DLLEXPORT(unsigned int) n0tou(non0string *source);
DLLEXPORT(unsigned long long int) n0tolu(non0string *source);

#endif
